Multiple Test Conditions ^^^^^ **Definition:** * A test is trying to apply the same test logic to many sets of input values each with their own corresponding expected result. **Code Example:** .. code-block:: java public void testMultipleValueSets(){ // Set Up Fixture Calculator sut = new Calculator(); TestValues[] testValues = { new TestValues(1,2,3), new TestValues(2,3,5), new TestValues(3,4,8), new TestValues(4,5,9) }; for (int i = 0; i < testValues.length; i++){ TestValues values = testValues[i]; int actual = sut.calculate( values.a, values.b); assertEquals(message(i), values.expectedSum, actual); } } private String message(int i) { return "Row "+ String.valueOf(i); } **References:** .. admonition:: Quality attributes * :octicon:`file-code;1em` - Code Example * :octicon:`comment-discussion;1em` - Cause and Effect * :octicon:`graph;1em` - Frequency * :octicon:`sync;1em` - Refactoring * `xUnit test patterns: Refactoring test code `_ :octicon:`file-code;1em` :octicon:`comment-discussion;1em` :octicon:`sync;1em`